<?php

namespace App\Models;


use Illuminate\Database\Eloquent\Relations\HasMany;

class Knowledge extends BaseModel
{
    protected $table = 'tiku_knowledge';
    public const CREATED_AT = null;
    public const UPDATED_AT = null;

    public function children(): HasMany
    {
        return $this->hasMany(Knowledge::class, 'parentId');
    }

    public function post(): HasMany
    {
        return $this->hasMany(KnowledgePost::class, 'knowledgeId');
    }
}
